<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<script type="text/javascript">
	function fn1(){
		var i = document.getElementById("i1");
		var ul = document.getElementById("myul");
		/*  固定写法   记住就行*/
		 ul.innerHTML += "<li>"+i.value+"</li>";       
	}
</script>
</head>
<body>
<input type="text" id="i1">
<input type="button" value="添加" onclick="fn1()">
<ul id = "myul"></ul>
</body>
</html>